package com.fgou.springcloud.service.Dept;

import com.fgou.springcloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author 99
 */
@FeignClient(name="SPRINGCLOUD-PROVIDER-DEPT-8081/dept",fallbackFactory = DeptClientServiceImpl.class)
public interface DeptClientService {

    @GetMapping("/list")
    List<Dept> getDeptAll();

    @GetMapping("/get/{id}")
    Dept getDeptById(@PathVariable(value = "id") Long id);

    @PostMapping("/add")
    Boolean addDeptOne(@RequestBody Map<String, String> map);
}
